import 'package:enjoy_community_flutter/router/index.dart';
import 'package:enjoy_community_flutter/store/counter.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

void main() {
  // 全局配置 Provider
  runApp(MultiProvider(
    providers: [ChangeNotifierProvider(create: (context) => Counter())],
    child: MaterialApp(
      // 路由配置
      routes: RouterManager.routes,
      // 路由拦截配置
      onGenerateRoute: (settings) => RouterManager.onGenerateRoute(settings),
      // 初始化的加载路由的路径
      initialRoute: '/',
    ),
  ));
}
